Fixes for issue6