Fixed object null reference error