fix for controller close