Fix bug: order between from and to was reversed

Signed-off-by: Igor Popov <igor.popov89@gmail.com>