Added various fixes