fixed loop token issues