add init object attr
fix prototype generation