Fixing big old bug in security middleware that prevented queries trough browser