Add event locking