fix initialize bugs