fixed change of locomotive type

functions were not correctly set