temp fix to prevent errors on screen rotate