fix bug with tailing slash (#8)