Updated #835. Fixed the previous commit that broke the tests.