Fixed two bugs with texts. Still missing unit tests for these