PM orders inquiry over mishandling at court