fixing port check from config