fixed issue with localization; added debug option