Fix plotting utils bug