Fix callbacks, flag preservation