some little bug fixes

Got some more bugs fixed, etc.