fixed edge case when using [chunkhash:xxx]

#427