Avoid PHP Notice:  Undefined variable: fcount
Avoid PHP Notice:  Undefined variable: inserted_post_key
Avoid PHP Warning:  end() expects parameter 1 to be array