Fixing 2 issues
1. flag was being shifted into the bit shifter, should have been ~flag in order to maintain the NOR funcitonality
2. The write enable for the output queue was being picked up from a delayed version of the instruction
With these fixes, now sorting of 20 numbers on 10 PE's is working in suimulation