Use the callback in connect if present