Added safety test that might fix bug.