Anti-locking mechanism