fixed #27 and fixed #28