Added code to retain instance on rotation.