Fixes some potential issues.