Fixed redirect and event handler