fix indexing bug in WECB/RECB