fixed a bug where $texts should have been an array