removed debug output
fixed bug with select and get local port