fixed stupid bug of snap-to-screen