replaced httpreq with $http
merge fix