Why is this being scoped to an empty object?