Fixes issues related with #17

Fixes `RuntimeError` caused by #17