removing fine grain pen position, and fixing a window restore state bug