Fixed errors after copying over load/save functions