fix mode mapping