Fix null pointer exception in system components