Bug fixes

Fixing issues that appeared in the previous update.