fixing abort for script