fix crash with console