added redirect if api doesnt work