fix drawing under windows