fix bug in macro path parsing with a remainder