Fixed some string checking