FIX: Replace deprecated control tags with loop tags, for 3.1 compatibility