fixed a bug with using empty paths.