Fixes broken test logic