Bugfix + tests for is.empty