Fix for disposal methods 2 and 3. Also made minimal framerate=5 instead of frame counting
Thread sleep after frame, not before