prevented exception in curve conversion by using generic conversion