fix errors reported by Facebook's scheck