Fixed 2 bugs with selecting textarea when it is empty. Need to comment code, so many cases