some fixes crypto stuff