Fixed failing unittests from previous patches.