Fix bug with using apptoken

Add this. for apptoken