Fixed most of #6