fixed validattion before conversion bug