fix type comparison issue
fix initialize order warning