fix bug involving paths with spaces