fixed a few buggy things from last commit