ported changes from FX