Fixes #15, thanks @adambard