Fixed exception

Bug #51