Bugfixes. (still doesn't work though)