fix some enum usage