Probably because the user's profile has not been fully loaded when your script ran. Please review the FAQ forum for ideas and solutions.