Fixed for Zabbix 2.0 and some improvements