Fixing undefined array when nop teacher assigned