Fix pmap clear
Optimize utils