Try to filter out bad maps

fixes ticket:3982
Merge branch 'bugfixes'