fixed a few bugs with various things.