Dima's patch handled
Added typedef to enum