fixed #22 and fixed #23