fixed a few bugs from the last commit