Corrected replacing default profile

Also solved several lint problems