added protection before wrong port