fix token not applying

done for [AGIOS-179](https://issues.jboss.org/browse/AGIOS-179)