Fixed pane-switch bug; added close binding.