Fixed sprite image index copy in getRef()