fix the weird ruby disappearing variables problem, which was related to scopes