fix lock handler code. input is bits not a number
...