Replaced a call to a function for a variable

Closes #1700