Fixed casting int to enum