Fixes for script