Revert "Fixed bug which migh have caused crashes"

This reverts commit 24f5efb9848fd340d3e45fa18863aeebeff49814.