Fixed #28 and #30