Fix attachment fetching to be object based