Fix string comparion on open method