Fixing template issues in the expressions class.