fixing bug inscript