bug fixes and invariant dataset