Bugfixes, using dict again