Fixed issue #51, #52