merged pull #226 which is a partial fix for #86 removing disconnected areas