Fix for #53 from @Prydie. Cheers