Fixes for failing unit tests