Bugfix: schema was being set to locked not locking.