Modified to support Grails 2.2.0