Changed array to unsigned char* as there was some odd results due to casting when using signed chars. Still having issues