Fix running in console