fix slowness of randn introduced by 84b6aec6