fix function mapping issues