fixed issue 5 for real

put the extra condition in the wrong place on the last commit.