Fixes for issue #343 #328