Implemented proper shape switching. #122