added additional check in core and removed console.log from types