BUG : fix glaring logic errors
BUG : fix glaring logic errors

danielballan/dataportal,tacaswell/dataportal,ericdill/databroker,danielballan/datamuxer,tacaswell/dataportal,ericdill/datamuxer,NSLS-II/replay,ericdill/databroker,ericdill/replay,NSLS-II/replay,NSLS-II/dataportal,ericdill/datamuxer,ericdill/replay,NSLS-II/dataportal,NSLS-II/datamuxer,danielballan/dataportal,danielballan/datamuxer