fixed handling of completed blocks