Fixed some little errors with the drawing functions.