field type detection was made before optional conversions so it might be wrong; i replaced it with a more simple solution