Fixed error with listener