Fix broken applescript