Made the switching of activities working