Fixed typing error

MSVC++10 refused to compile this line without proper typing.
Further optimisation
Merge pull request #64 from VladVP/develop

Code should now be fully compatible with MSVC10