fix PSCN BRAY (tmp = 2) not stopping normal BRAY from going through

also some other random things
Merge remote-tracking branch 'origin/master'