Bug fix and add multi-layer eigen functions