Fixed two place of undefined variable notice