Fixed a bug in open