Fixed issue #4, thanks @elfring