added safe handling of NaN-features