array fix QP; tests