Fixed it to stop losing data when screen rotates.