fixes issue #2942