Fixed bug in the csv reader when inferring type

This caused the sometimes failing builds