Fix bugs in http metrics