Code not working in pre 2009 release