small bugfix to script