Fixed resurect() for new Angular