Fixing script to be able to use tags