fix #289 and add files I forgot