Bugfix for random mappings