Fix for keeping document auto selected