Got rid of a null pointer exception because of hidden components