Working on better simulation implementation, fixed a bug where the port handle was not fully released