fix reloading code, use persistant mask