Fixed bug if latest row has incomplete data