fixed #160, cursor was not restored in case it was not visible