avoiding 500-internal-server-error