Fix hiddenLayers and add test