fixed some backward compatibilities issues.