Make sure nrows is integer before calling prep_set_nrows.