bugfixes to sequential algorithm