Fix "Called id for nil" error