Revert "Dirty hack for 1.7"

This reverts commit c1dd799efa70cf35757298a55e806aa139fa36bf.