fixes for stupid errors and glitches