fix for #81 and lame performance issue

@aL3xa please see the details of my commit msg and merge this ASAP if you agree.
**After that**, I suggest to chat about `is.empty` as this behaviour seems to be strange for me.