Fixed unicode exception in endpoint decorator