fixed bugs with http