Fixed some coding errors