workaround for securerandom bug