fixed bug in fortok when no delimiter at the end