improved error prevention