Fix query to use the enum instead of the name
Correct missing resource error