Related to #68. Awful patch to keep backward compatibility.