updated todo, small bugfixes, forgot to reset variable