Fixed function call with error completions incorrect flow control
Added tests for function error