advance setting and fixed bugs