Fixed issue #3, thanks @lorien