fix error undefined fn