fixed coding errors