fix function references