Fix variable typo and handle backend_portX as integer