fixed php notice undefined variable
fixed php notice invalid index