fix to pandas reader function and last timestep bug