bug fixes
bug fix for function calls