corrected some corner case error for single formula types