fix lock timeout handling. Fixes #82. Thanks so much, @honx