Bug fixes

Just a few bug fixes.. nothing major..