Fix #48 and #53