Fixed issues that were found during negative testing.