prevent lock function from returning a false false