fix bug: still warnings about undefined variables with print