Moved code deeper into test, might be because of intermixed test running