fixed tie logic. firebase broken now.