Fixed two randomly failing unit-tests