Fix for batch selection bug