Remove instanceof check, JS redirect fix