Fixes

Fixed #550
Fixed #417