fix bug in APILogger middleware; v0.0.4