Couple of bug fixes for Maven support