Fix for elvine

this supersedes #2315