preventing some errors