Added some checks to the building of components