bug fixes for BEQ and J