Fixing notice errors