Bugfixes/Warningfixes by Alex Fix