fixed depth issue by refactoring load/save