fixed bugs with my refactor from last night