fixed bug with ncones. using memcpy for memory