fixing ajax favorite error