fixed some glitches in modifications