Fixes for bug #931904,bug #1289284