fixes script issues (wip)