Changed some checkings