Fixed console polyfill bug