fix resolution bugs.