Two attempts at fixing #572. I don't know what's going on