fix bug for compatibility