fix allocation of basequal array