fixed lock bug