Bug Fixes

Reflects changes / bug fixes from master branch.