fixed issue when datasets were reloaded (e.g. switching between back and front)