Fixed TypeError on post