Fix #179: fix sequences flatten method