Fix bugs with [img] tags.