Fixed broken test due to deprecated event handler