Fixed schema saving/restoring.