fix calling order