fix dup code pointed out by mmatos (#16)