Fixed don't apply for ajax requests