added code to allow locks to timeout