Fixed bugs with argv handling.