BUG: Fix/test invalid lwork param in qr