Prevent multiple attachment of handlers.