Test: Adds back stats test.
Code: Fixes condition.
Fix source map in stats test