fix a few bug and baseline mode