App doesn't crash when rotating with an dialog opened (Still not happy with the way it's done)