Fix for error, if no callback is given to connect