Fixing bug that stops tests from running