Court blow for Malawi president