added panics in stubs.go