Fix bug that prevent configuration from being written