fixes #216
delay the scoping to prevent the flickering