Fixes issue pyrocms/pyrocms-professional#113

The same fix for 2.1.