Fixed some code issues.