Fixed lock bug