The Kerala High Court on Wednesday set aside the transfer of a sessions judge who had made controversial observations in his orders while granting bail to an accused in two sexual harassment cases in Kozhikode district of the state, saying the decision to transfer him was "punitive in nature" and "unfair".