Sharapova battles past error-prone Azarenka