fixing errors when trying to process empty ting references
resolving merge conflict