improved script label isolation
(credits to akbalder)