fix pen drawing