Fixes

Fixed #561
Fixed #560