fix tests and onClose-Methode of Component