please add this code bits! (from old ZK chili)

these stuff is useful and used by ZK widget, adding this to chili source would facilitate future merging. Currently commit often forgot to re-add this bit and cause minor bug in widgets.