More enum-fixing with code blocks.(cherry picked from commit f8b0845b256f4c5816493000a1dd7835ec3a6d9a)