Added test workloads and fixed array out of bounds