added form validation, fixed decode_polygon
added form validation, fixed decode_polygon