fixes errors for #280
fixes installation bugs