Bug fix, undefined $data