Fixed up script