fix layer conditional on scripts