befunge calculating correctly, not terminating at last value