fixed return value of prepareText