Custom keystore to avoid connection errors, minor fixes