fixing possible startup crash