fixed many small annoying errors