Fix some rights issues

fix #5, #14