Bug fixes

fixed a couple issues with the last commit