Fixed a bug with adding polygon features.