this line needs to be moved to the end, see #1408.