close #15, random fixes