Bugfixes to prevent warnings.