corrected errors from console.