fix narrowing error