repair long flag support