fix crash due to standard error not being redirected.
also rehide program window