Changed reordering, suggested by sblanc