actually fixed the bug that the last 3 commits were soupposed to fix