Bugfixes. Should work now