Fixing test so it works in release and debug