fix function dependencies