Fixing opening and closing of ordering popup.