Fix a couple cases, add tests for NA warnings