Bug fixes

(should fix NPE in Tarjan)