fixed Bug 1047 (committed for Jeff)