Fixed some bugs which led to an early abortion of the vns-loop