fixes

fixes for those pesky bugs. I guess I cut the PR on this one way too early (both in my testing, and on the clock)