Fixing bug with activity