More custom code errors fixed