add checks
fix warning