Add tests for drawing and fix b45f3fe