Fixed bug that controller type was not saved