fixed bugs from bad git merge