Fixed bug with recursion in package generation