undefined id errro fixed