Fixed bug: missing port makes register fail