Fix for Grails 2.3.2

This patch fixes the problem I've had with Grails 2.3.2.
Don't know if it is a real issue but I make the pull request in case it is necessary.