pass dimensions to sparse(). this was broken when not all variables have QP terms