fix for a nasty warning due to factors in data.frame