sync block, fixed null pointer