Change domain of function evaluation

Fix bug 2740