Prevent reverse bug near screen edges