fix redirecting to empty page