Fix two enum-cast warnings