Fixed bug regarding getAllComponents