Bug fixes
Fixed unit tests