Bug fixes and bind console.log