script updates; fixed previously mentioned bug