fixed 2 minor bugs caused from enum