Fix failing tests

Fixes failing tests in master. #1222.