fix for enum query issue