Our modifications and bugfixes