improvements & bugfix

fix insensitive case in DB
unified 404
cache 404
comprehensible debug