Fixed some problems with dataframes