fixed toggle and a few other things