Bug fixes to team-profile-backend.php