fixed closing backend issue