Bug fix to x mode mapping