fixed a bug where the function map feature wasn't working properly