fix onInit callback