fixed problem of delegates accessing static resources