GM-6681: Fixing enum cast