added tests for enumerators and fix minor issue