Fix some bugs. Enable extensions again and improve extension connection.