Fixed bugs introduced by level loading change.