check return value stop seg. Bug #967