Fixes TypeError on CMS 2.4

Closes #22