Fixed a bug with the open command