Updated disable function