Code looks good. Try putting breakpoints in there to make sure that all the statements are indeed executed.