remove undefined var causing php notice