More fixes for issue #1291