Fixed some code issue bugs.