Bugfixes

What was I thinking while I coded this???