fixing close method on classic desktop