Fix bug #903 by xboston