fix #31 and removal of console.log leftovers