Bug in scrip