fixed unproper labeling introduced in earlier commit. Added mask to nan values