Do you mean that when you switched your master scientist's preference from science to building, and later back to science, he went from master scientist to adept scientist?

If he went from master scientist to adept builder when you switched preference from science to building, that is normal. Just switch his preference back to science and he should be a master scientist still.