fixed bug in flex port