finally fixed pencil tool