fix issue 25 and 27