Fixed a small bug concerning break conditions

(times || times == undefined) would be always true (except for times == null)