Fix lua locking