Move check to a sensible place