Fixed error that left a scope early