fixed issue with firebase rerites.