Fixed some coding issues