adding more checks and tests for dealing with an empty manifest