Script is buggy