Fixed possible fatal error (#593)