More advanced check for q while inv is open