More module/port fixes and error improvement
More port fixes