Fixed issue where end of experiment would not trigger properly