fixing vertical layer indexing problem, how has no one not noticed?!@