Fix bug where text overlay was not updated properly

Fix bug where text overlay was not updated properly when out of range