Fixed wrong redirect code