Justice ministry seeks to regain control of buildings