Cleaned up ordering of when.