Improved compatibility with Craft 1.4