fixed bug in fromto option