Fix base resource to prevent recursive encoding