fix several bugs and apply textarea size (too large change to explain)