Upgrade to build with Maven 3.1
Handling NPEs