BUG: dangling variables