Fixed the port for listening
Better handling of extensions