fixed enum validity bug