Fix bug in code with binding with http server