Fix procedure order