Added more checkings.