Bugfix which prevents some warning messages.