fixing bug with app getting added to sessions twice