added missing use, fixed undefined variable