Fixed bug in %runscript magic