[#4] Fixed flaws pointed out in the comments.