added init calls, fixed connect issue