fix for console use