Fix bug to call the right C functions for DrawingWand
Improve error checking in API