Fix adding wrong undos and style isn't being changed while drawing with pen.