added more workarounds for the text bounds problem