Fixed so error boxes has onClose event