close x display properly