Majour pim_tools bug fix