path and argument handling fixes