Accidentally put the if check for $id outside the check for $initial.