Fixed failed unit tests related to #1837