Fixed the $http issue