Added K-Shape test and fixed problem.