fixes #30 and fixes #31
workaround for http://jira.codehaus.org/browse/MRELEASE-812