Fix computing of arguments for functions calling. Some spec fixes