refactor theme project restore logic