fix reference error in Adlayer class