move the if check up, saving some processing time.
string changes