fix some bug for performance implementation