automatic locking device