fixing some odd behaviour inside the avatar service

The avatar service was throwing an error rather than returning an empty array, it is also now able to take in the avatar size as a parameter