Fix shell script mode hook.