Added checks '&&' instead of ;