better responses and redirect bug