fix ErrorException

"Only variables should be passed by reference"