fix fit-to-screen bug