fix bug in background and myscript