fixed a bug in kirbytext