Several updates/bugfixes