some exception fixes when calculating invalid function values
Show confirmation dialog when trying to delete all functions.