Attempted to fix invalid map check