bug fix for multiple funcs