fix function tests