Fixed port range and added debug