fix initialize code