fixed posindexing bug at normal calculation