Fix bug which could cause console.logs written in the first tick of the event loop to have a non-compliant return value.