Fixed coding errors found through validation.