fixed errors showing in modalboxes without redirect