Added preconditions in certain negative tests to prevent false positive results.