Fixed error in accuracy calculation

Wrong indexing was performed when nan-ing re-initialised parts of trajectory, as the any() function was evaluated on columns instead of rows.