Minor improvment & type error fix.