0.2.3: fixed error middleware's bug