#140 Memory Access violation

fixes #140