fixed update_groups.php to update first and last