have to brelse before close to avoid hanging