fixes for postgis 2.0