fixed issue with exception on screen rotate