fixed double-submit bug and shuffled def array
merged