Fixed #36 and #37