Fixed #27 and fixed #28