improving configuration and debugging nan error on correlation