Fixed bug which prevents serial port to be opened

Jira issue: WP-788
Merge pull request #479 from glatorre/WP-788

Fixed bug which prevents serial port to be opened [WP-788]