Fixed #27, fixed #12