I think it was. You have to set the boundaries straight if he likes you in a way that you don't like him. It's good that you told him that you only love him as a friend. It lets him know that you still care about him but you don't want a relationship. Although he'd be heartbroken, it's best that he knows before something awkward happens.