Edit: The function works, the status changes to Y but it gives me a NullReference Exception: System.NullReferenceException: \'Object reference not set to an instance of an o