Fixed http API bug