Fixed #29 and fixed #25