Fixed running programs with long names (#379)