Added debugging for a scope issue