Fix #16 and maybe #15