fixed issues with data persistence through orientation change and
activity switching