Prevent some errors from happening.