bug fixes
fixed a few bugs