fix undefined variable message