Fix bug 301 and check status code