fix layerX layerY bug on FF