Corrected error in mode 6, removed unnecessary barriers