There ought to be tests for this...!