fix null, add test