fix bug in lock5.c