reset instance flags, fixed #65