random bug fixes
more random bug fixes