Fix ordering of activities as required