Minor bugfixes

Fixed undo function when a pixel is colored multiple times.