fix bug in bezier drawing