fixing firebase datasnapshot vs reference issue