fixes to views and to postgis JSON