[minor] several minor fixes and allow rebuilding from object