handle plugin properly and remove redirections