Fixing bug where string compare would error out when it shouldn't