Fixed initial lock bug