fix getTail with thymeleaf