Fix server keyMin code