Pix potential undefined index bug