fix some glitches