Fixed #38, fixed #1230 (which is a duplicate).