Hacky fixes for new crypto stuff