fixed bug with conversion