preventing errors