fixed a part of #1121, only one FIXME left