Fixed invalid bug