Fixed some annoying errors