fix out of screen error