hopefully fixed closing problem