fix record nil comparison
fix record equality