Changed return from 0 to nil