Final fix for script