Fixes wrong certificate choosen