Fixed #528, fixed device creation
Merge pull request #547 from dswd/fixes

Fixed #528, fixed device creation