fixed an edge case, removed a console.log