Fixed callback bug in init