Fix dependancy order