Fixed saveProperties crash due to bad value given to function