General fixes

General fixes.
Please review.