fix rand arr to bn converter