Fix script to run as command