Gateway: constructor bug fix