Fixes

Fixed #637
Fixed #614