Bug fixes

more stuff