caught a few bugs