Added fake 2-phase locking to system to make it more realistic