Fixed #1137, #1142