Actually, what's the second parameter for? :) You seem to pass the target block count in one place, current block count in another and -1 in yet another.