Trying to fix some problems with dataframes