Fixed some code