fixed possible inf. loop in ParseBlock