Fixed #8, fixed #16