some fixes and such