Variable tresql method fix