correct variable usage

For issue #544