Fixed some warnings
Fixed #799