Fix for r scripts, have to deal with na's