fixed the return type of first_row()