use proper if-else

Jira-issue: WP-1251
whitespace fix

Jira-issue: WP-933
bump version to 0.8.6
Merge pull request #24 from aldafu/WP-1251-fix-errcb-handling

Wp 1251 fix errcb handling