Fix reordering of configuration code. #1010