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

Jira issue: WP-788