updated StageListener.java