prevent infinite loops when listening to firebase