Fix Issues pointing out in PR #354