Add minor performance improvement, map visibility fix, more checks