Fixing the lock decorator