fixes bug which references df_long in the case where it didnt do any pivoting