Fixed some possible issues.