fixed crashing error closes #84