fix gateway sample building