bugfix in switching activitys