Fixed problem with close