add stats endpoint; fix not found case