Some updates and bugfixes