Fixes segmentation fault in FUNC_API_Send (MAID-191)
Fixes coding style
Merge pull request #24 from inetic/MAID-191

Fixes MAID-191