Bug fixes

Squashing bugs