Fix connect callback