Use a more intelligent locking system