Fixed a bug, passed accidentally a host array to device function