Merging GEOS-6487 and fixing imports