Bug Fixes for All scripts