Fix null object not working