script fixes, adjustments