Fix bug to check runtime error.