undefined variable fix